﻿using System.Configuration;

namespace ErrorDumper.Configuration {
    public class DataSourceConfigurationSection : ConfigurationSection {
        private const string _sectionName = "errorDumper/dataSource";

        public static DataSourceConfigurationSection GetSection() {
            return (DataSourceConfigurationSection)
                ConfigurationManager.GetSection(_sectionName);
        }

        [ConfigurationProperty("virtualPath", IsRequired = false)]
        public string VirtualPath {
            get { return (string)this["virtualPath"]; }
            set { this["virtualPath"] = value; }
        }

        [ConfigurationProperty("connectionStringName", IsRequired = false)]
        public string ConnectionStringName {
            get { return (string)this["connectionStringName"]; }
            set { this["connectionStringName"] = value; }
        }

        [ConfigurationProperty("eventLogSource", IsRequired = false)]
        public string EventLogSource {
            get { return (string)this["eventLogSource"]; }
            set { this["eventLogSource"] = value; }
        }
    }
}